// pages/major/index.js
const App = getApp();
Page({
  /**
   * 组件的属性列表
   */
  properties: {

  },

  /**
   * 组件的初始数据
   */
  data: {
      p_list:[],
      shop_id:''
  },
  onLoad(options){
    this.shop_id=options.shop_id;
    this.getData()
  },
  /**
   * 组件的方法列表
   */
    createAll(e){
      console.log(e.currentTarget.dataset.goods_id)
      wx.navigateTo({
        url: '/pages/order_creted/index?goods_id='+e.currentTarget.dataset.goods_id+'&good_type='+'1',
      })
    },
    getData(){
      let app=this
      App._get('goods/getService', {
        shop_id: app.shop_id
      }, result => {
        // 设置顶部导航栏栏
        // _this.setPageBar(result.data.page);
        app.setData({
          p_list:result.data.list
        });
      });
      
    }
})
